import Vue from 'vue'
import Router from 'vue-router'




import index from '@/pages/index/index.vue'
import takeOrder from '@/components/takeOrder.vue'
import waitPay from '@/components/waitPay.vue'
import buySuccess from '@/components/buySuccess.vue'

Vue.use(Router)


export default new Router({
    routes: [
        {
            //重定向
            path: '*',
            redirect: '/takeOrder'
        },
        {
            path: '/index',
            name: 'index',
            component: index
        },
        {
            path: '/takeOrder',
            name: 'takeOrder',
            component: takeOrder,
             children:[

            ]
        },{
            path: '/waitPay/:id',
            name: 'waitPay',
            component: waitPay
        },{
            path: '/buySuccess/:id',
            name: 'buySuccess',
            component: buySuccess
        }
    ]
})